package com.heima.comment.user.pojos;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

@Data
@Document("ap_comment_repay")
public class ApCommentRepay implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Field(name = "commentRepayId")  // MongoDB 文档的唯一标识符字段  评论回复id
    private String commentRepayId;

    @Field(name = "authorId")
    private Integer authorId;  // 作者 ID     从UserThreadLocalUtil中获取

    @Field(name = "authorName")
    private String authorName;  // 作者名称    从UserThreadLocalUtil中获取

    @Field(name = "commentId")
    private String commentId;   // MongoDB =  评论id

    @Field(name = "content")
    private String content;  // MongoDB 评论内容    前端传

    @Field(name = "createdTime")
    private Long createdTime;  // 创建时间戳    （自己补充）

    @Field(name = "likes")
    private Integer likes;  // 点赞数量

}
